#include <stdio.h>

int  Fib(int n);

int main() {
	int n = 0;
	scanf("%d", &n);
	printf("%d", Fib(n));
	return 0;
}

int Fib(int n) {
	int n1 = 1, n2 = 1;
	int n3 = n1 + n2;
	for (int i = 0; i < n - 3; i++) {
		n1 = n2;
		n2 = n3;
		n3 = n1 + n2;
	}
	return n3;
}